layui.use(['table', 'form', 'jquery', 'laydate'], function () {
    let table = layui.table;
    let form = layui.form;
    let $ = layui.jquery;
    let laydate = layui.laydate;


    //关闭自身并刷新上级
    window.formClose = function(){
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        //layer.msg(index);
        parent.layer.close(index); //再执行关闭

       // var parentIndex = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
       // parent.location.reload();//刷新父页面，注意一定要在关闭当前iframe层之前执行刷新
        //parent.layer.close(parentIndex); //再执行关闭
    }


    //关闭自身，不刷新上级
    window.formCloseNoRefresh = function(){
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        //layer.msg(index);
        parent.layer.close(index); //再执行关闭

        // var parentIndex = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
       // parent.location.reload();//刷新父页面，注意一定要在关闭当前iframe层之前执行刷新
        //parent.layer.close(parentIndex); //再执行关闭
    }
})